<template>
  <div class="app-container">
    <el-card class="box-card">
      <el-form ref="goods" :rules="rules" :model="goods" label-width="150px">
        <el-form-item label="富文本">
          <editor v-model="nav" :init="editorInit" />
        </el-form-item>
      </el-form>
    </el-card>
    <div class="op-container">
      <el-button @click="handleCancel">取消</el-button>
      <el-button type="primary" @click="handleEdit">保存</el-button>
    </div>
  </div>
</template>
<script>
import Editor from '@tinymce/tinymce-vue'
import { footEdit, editfoot } from '@/api/config'
import { createStorage, uploadPath } from '@/api/storage'
export default {
  name: 'ConfigFootedit',
  components: { Editor },
  data() {
    return {
      
    }
  },
  mounted() {
    const id = this.$route.query.id
    this.id = id
    footEdit(id).then(response => {
      console.log(response)
      this.nav = response.data.data.contont
    })
  },
  methods: {
    handleEdit() {
      var that = this
      editfoot({ id: this.id, contont: this.nav }).then(response => {
        if (response.data.errno == 0) {
          this.$message({
            message: '修改成功',
            type: 'success'
          })
        }
      })
    }
  }
}
</script>
